//
//  UserDataEditTagCell.m
//  Molian
//
//  Created by 胡津 on 6/7/15.
//  Copyright (c) 2015年 xiaocan. All rights reserved.
//

#import "UserDataEditTagCell.h"
#import "JCTagListView.h"
@implementation UserDataEditTagCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        //        self.selectionStyle = UITableViewCellSelectionStyleNone;
        self.layer.masksToBounds = YES;

        //推荐标题
        self.titleLabel = [[UILabel alloc]init];
        self.titleLabel.frame = CGRectMake(10, 0, 70, 50);
        self.titleLabel.textColor = [UIColor grayColor];
        self.titleLabel.textAlignment = NSTextAlignmentRight;
        self.titleLabel.font = [UIFont fontWithName:FontName size:14];//改字体和大小
        self.titleLabel.adjustsFontSizeToFitWidth = YES;
        [self.contentView addSubview:self.titleLabel];
        
        
        self.tagListView = [[JCTagListView alloc]initWithFrame:CGRectMake(80, 2, DeviceWidth-90, DeviceHeight)];
        self.tagListView.canRemoveTags = YES;
        self.tagListView.userInteractionEnabled = NO;
        [self.contentView addSubview:self.tagListView];
        

    }
    return self;
}

- (void)awakeFromNib {
    // Initialization code
}

-(void)cellframe
{
  //  [self.tagListView.collectionView reloadData];
//    [Utils saveToDefaults:[NSNumber numberWithFloat:self.tagListView.collectionView.contentSize.height] forKey:[self.titleLabel.text isEqualToString:@"特技"] ?@"specialHeight":@"likeArrHeight"];
}

-(void)layoutSubviews{
    [super layoutSubviews];
   // [self.contentView addSubview:self.tagListView];
  // [self.tagListView.collectionView reloadData];
   
 //  self.tagListView.frame = CGRectMake(80, 0, DeviceWidth-90, self.tagListView.collectionView.contentSize.height);
//    [Utils saveToDefaults:[NSNumber numberWithFloat:self.tagListView.collectionView.contentSize.height] forKey:[self.titleLabel.text isEqualToString:@"特技"] ?@"specialHeight":@"likeArrHeight"];
    
    

}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
